from flask import Flask, render_template, jsonify

from utils.data_analysis import load_and_process_data

app = Flask(__name__)


@app.route('/')
def index():
    return render_template('index.html')


@app.route('/api/data')
def get_data():
    data = load_and_process_data()
    return jsonify(data)


if __name__ == '__main__':
    app.run(debug=True)
